package com.prs.crm.domain;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import com.prs.crm.domain.fs.BankAccount;


/**
 * 币种
 * @author Administrator
 *
 */
@Entity
public class Currency extends FlowCodeEntity{

	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String name;
	
	private String currencycode;
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy ="currency")
	private Set<BankAccount> bankAccounts;
	
//	@OneToOne(fetch=FetchType.LAZY,mappedBy="currency")
//	private Code code;
	public Set<BankAccount> getBankAccounts() {
		return bankAccounts;
	}

	public void setBankAccounts(Set<BankAccount> bankAccounts) {
		this.bankAccounts = bankAccounts;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	/**
	 * 比率
	 */
	private Double rate;
	
	private String remark;
	

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	

	public String getCurrencycode() {
		return currencycode;
	}

	public void setCurrencycode(String currencycode) {
		this.currencycode = currencycode;
	}

//	public Code getCode() {
//		return code;
//	}
//
//	public void setCode(Code code) {
//		this.code = code;
//	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

	public Double getRate() {
		return rate;
	}
	
	
	
}
